Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytes argument to HumeBatchClient.submit_job() instead of only accepting file paths #121

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

josh3io
Copy link
Contributor

@josh3io josh3io commented Apr 23, 2024

allow sending a file as bytes to the batch API.

Not sure how you feel about merge commits here...I wrote this before the latest release.

    client = HumeBatchClient(getenv("HUME_API_KEY"), timeout=300)
    configs = [
        BurstConfig(),
        ProsodyConfig(),
    ]

    with audio_filepath.open("rb") as f:
        audio_file_bytes = f.read()

    job = client.submit_job(
        [],
        configs=configs,
        filebytes=[(f"{audio_fake_filename}", audio_file_bytes)],
    )

@josh3io josh3io marked this pull request as ready for review April 24, 2024 21:44
@gregorybchris
Copy link
Member

Thanks for the pull request @josh3io! Our team is a bit busy with the product launch, but we'll try to get back to you next week with a review!

@josh3io
Copy link
Contributor Author

josh3io commented Apr 26, 2024 via email

@gregorybchris
Copy link
Member

Tests are passing (finally), but I will do a few more manual tests before merging

@gregorybchris gregorybchris merged commit 079794a into HumeAI:main Jun 18, 2024
5 checks passed
@gregorybchris
Copy link
Member

Thanks for your contribution and patience @josh3io !!

@josh3io
Copy link
Contributor Author

josh3io commented Jun 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants